/** NursePanel **/

package docoffice.gui;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class DoctorPanel extends JPanel {
	
	private final JLabel doctorTitle, blank;
	
	private final JButton createPatient, deletePatient, viewPatient, viewAppt;
	
	public DoctorPanel() {
		doctorTitle = new JLabel("Doctor Login");
		blank = new JLabel();
		
		createPatient = new JButton("Create New Patient");
		deletePatient = new JButton("Delete a Patient");
		viewPatient = new JButton("Patient Lookup");
		viewAppt = new JButton("View Appointments");
		
		createPatient.addActionListener(new CreateListener());
		deletePatient.addActionListener(new DeleteListener());
		viewPatient.addActionListener(new ViewPatientListener());
		viewAppt.addActionListener(new ViewApptListener());
		
		
		setLayout(new GridLayout(4, 2, 15, 10));
		add(doctorTitle);
		add(blank);
		add(createPatient);
		add(deletePatient);
		add(viewPatient);
		add(viewAppt);
		
		setPreferredSize(new Dimension(500, 130));
		setBackground(Color.WHITE);
	}
	
	private class CreateListener implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			System.out.println("Create New Patient was clicked");
		}
	}
	private class DeleteListener implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			System.out.println("Delete a Patient was clicked");
		}
	}
	private class ViewPatientListener implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			System.out.println("View Existing Patients was clicked");
		}
	}
	private class ViewApptListener implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			System.out.println("View Appointments was clicked");
		}
	}

	public String toString() {
		return "DoctorPanel [doctorTitle=" + doctorTitle + ", blank=" + blank
				+ ", createPatient=" + createPatient + ", deletePatient="
				+ deletePatient + ", viewPatient=" + viewPatient
				+ ", viewAppt=" + viewAppt + "]";
	}
	
}
